<?php  
session_start();
//manggil file

include("../../config/config.php");
$nip=$_SESSION['NIP'];
if(isset($_POST["Save"]))  

{
	$nama_training = $_POST['nt'];
    $lembaga_training = $_POST['lembaga'];
	$jenis_training = $_POST['jenis'];
	$keterangan_training = $_POST['keterangan'];
	$tanggal_training = $_POST['tt'];
	$id_wajib = $_POST['id'];
	
	
		$sql = "INSERT INTO training(NAMA_TRAINING,ID_TRAINING_WAJIB, LEMBAGA_TRAINING, JENIS_TRAINING, KETERANGAN_TRAINING, TANGGAL_TRAINING, NIP)
		VALUES ('$nama_training','$id_wajib', '$lembaga_training','$jenis_training', '$keterangan_training', '$tanggal_training', '$nip')";
		$result = mysql_query($sql) or die(mysql_error());;
		mysql_close();
		//ngelempar file
		header('Location: /mpd/view/sdm/training.php');
}
?>
